package ar.edu.unq.wannaplay.pages.project;

import org.apache.wicket.spring.injection.annot.SpringBean;

import ar.edu.unq.wannaplay.pages.WPPage;
import ar.edu.unq.wannaplay.panels.project.NewProjectPanel;
import ar.edu.unq.wannaplay.services.ProjectService;
import ar.edu.unq.wannaplay.utils.ProjectEditer;

public class NewProjectPage extends WPPage {

    private ProjectEditer modelObject;

    @SpringBean(name = "service.projectService")
    private ProjectService service;

    public NewProjectPage() {
        super("New Project Page");
        modelObject = new ProjectEditer();
        this.initialize();
        this.addLanguageSelect();

    }

    @Override
    protected void addMainContent() {
        NewProjectPanel panel = new NewProjectPanel("mainContent", modelObject, service, this.getFeedBackPanel());
        this.add(panel);
    }

    public ProjectEditer getModelObject() {
        return modelObject;
    }

    public void setModelObject(final ProjectEditer modelObject) {
        this.modelObject = modelObject;
    }

    public ProjectService getService() {
        return service;
    }

    public void setService(final ProjectService service) {
        this.service = service;
    }

}
